package com.jp.controller;

import com.jp.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @类名称 UserController
 * @类功能描述
 * @作者 蒋正午
 * @日期 2019-09-07  23:42
 */
@RestController
public class UserController extends BaseController {

    @Autowired
    private IUserService userService;

    @RequestMapping("/")
    public String getName() {

        return "My name is jzw";
    }

    @RequestMapping("/getResource")
    public String getResource(String name) {

        return super.getValue("welcome.msg", name) + "," + super.getValue("welcome.url");
    }


    @RequestMapping("/addUser")
    public String addUser(){
        userService.addUser();
        return "添加用户成功!";
    }

}


